package com.koron.css2.newProjectCenter.mapper;


import com.koron.css2.newProjectCenter.bean.PjMeter;
import com.koron.css2.newProjectCenter.bean.query.PjMeterQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (PjMeter)表数据库访问层
 *
 * @author 朱超
 * @since 2022-01-21 16:55:59
 */
public interface PjMeterMapper {

    List<String> selectMeterBoreList(String consultId);

    /**
     * 初始化余额退款标志为 0
     * @param consultId
     */
    void initBalanceRefundFlag(@Param("consultId") String consultId);

    void updateBalanceRefundFlag(@Param("accountNo") String accountNo,
                                 @Param("balanceRefundFlag") int balanceRefundFlag);

    void insert(PjMeter pjMeter);


    
    void deleteById(@Param("id") String id);

    void deleteByConsultId(@Param("consultId") String consultId);
    
    void update(PjMeter pjMeter);
    
    PjMeter getSingle(PjMeterQuery pjMeterQuery);
    
    List<PjMeter> getList(PjMeterQuery pjMeterQuery);

    void delete(PjMeterQuery pjMeterQuery);

    void batchInsert(@Param("pjMeterList") List<PjMeter> pjMeterList);

    List<PjMeter> getListByIdList(@Param("pjMeterIdList") List<String> pjMeterIdList);

    Integer countMeterNo(@Param("consultId") String id, @Param("meterNo") String meterNo);

    List<PjMeter> getListByConsultId(String id);

    Integer getCount(String id);

    /**
     * 更新原水表的用户id
     */
    void updateByUserId(@Param("oldId") String oldUserId,@Param("newId") String id);
}
